-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix select star, col1 orderby col1 bug. #7743
fix select star, col1 orderby col1 bug. #7743
Conversation
Hi @yangxuanjia! Thank you so much for sharing this fix with us.
|
Oh, and I see that you will also need to do a |
Signed-off-by: AdamKorcz <adam@adalogics.com> Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: Hormoz K <hkheradm@gmail.com> Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: Hormoz K <hkheradm@gmail.com> Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: Hormoz K <hkheradm@gmail.com> Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: Hormoz K <hkheradm@gmail.com> Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
… by customer_id desc limit 0, 3; Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
94553ce
to
1994b97
Compare
Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
42919c8
to
59c9a18
Compare
Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
Hi @systay, |
Hello 👋 Looked at the changes earlier with @systay, it looks like a great fix. However, we are still trying to understand if the use of I personally think we should add an error message in select *, t.id from user t, user_extra where t.email = 'aaa11' order by t.id desc limit 0, 3; Today's code returns the error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @yangxuanjia for this contribution.
Long term, I think we should rewrite queries so that when the query gets to the planner, star expressions have been expanded, but until then, this is solving a real problem. Much appreciated.
shard env.
fix select star, col1 orderby col1 bug.
The problem is col1 parse index is 1. But before this column, there have a star(*), this will be some column.
so finally orderby from multi shards, use order index 1 will be make a bug.
This is a company inner fix, base on Vitess 6.0.
So I not really sure, Vitess9.0 whether is fix this bug or doesn't support this typical sql.